<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="pageTag" uri="/WEB-INF/tld/pageTag.tld"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript" language="javascript" src="${pageContext.request.contextPath}/resources/js/pageTag/page.js"></script>
<script type="text/javascript" language="javascript" src="${pageContext.request.contextPath}/resources/js/layer/layer.js"></script>
</head>
<body>
<form id="mainForm" action="${pageContext.request.contextPath}/talarm/list.htm" method="post">

<div class="input-group col-lg-2">
      <input type="text" name="sec" class="form-control" placeholder="Search for...">
      <span class="input-group-btn">
        <button class="btn btn-default" type="submit">查询</button>
      </span>
    </div>
共<span class="label label-warning">${total}</span>条记录
	<table class="table table-striped table-bordered">
		<thead>
			<tr>
			    	<th></th>
			    	<th>点位编号</th>
			    	<th>点位名称</th>
			    	<th>报警内容</th>
			    	<th>报警时间</th>
			    	<th>状态</th>
			    <th></th>
			</tr>
		</thead>
		<c:forEach items="${Talarms}" var="obj">
			<tr>
			    	<td>${obj.id}</td>
			    	<td>${obj.dwbh}</td>
			    	<td>${obj.dwmc}</td>
			    	<td>${obj.context}</td>
			    	<td>${obj.alarm_time}</td>
			    	<td>${obj.zt}</td>
			    <td>
			    	<a onclick="openwindow('查看','${pageContext.request.contextPath}/talarm/getId.htm?a=v&id=${obj.id}')" href="#">查看</a>
			    	<a onclick="openwindow('编辑','${pageContext.request.contextPath}/talarm/getId.htm?a=e&id=${obj.id}')" href="#">编辑</a>
			    </td>
			</tr>
		</c:forEach>
		<pageTag:page curPage="${talarm.page}" totalPages="${talarm.total/talarm.limit }" totalRecords="${talarm.total }" />
		<input type="hidden" name="page" id="page" value="${talarm.page}"/>
	</table>
</form>
</body>
<script type="text/javascript">
function openwindow(title,url){
	layer.open({
		    type: 2,
		    title: title,
		    maxmin: true,
		    area: ['600px', '400px'],
		    content: url
		  });
	}
</script>
</html>